home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Pascal / Games / Glypha 3.02 / source / Code ƒ / H-Initialize.p < prev    next >
Encoding:
Text File  |  1990-09-09  |  16.6 KB  |  479 lines  |  [TEXT/PJMM]

  1. unit Initialize;
  2.  
  3. interface
  4.     uses
  5.         Sound, GameUtils, Enemies, GlyphaGuts;
  6.  
  7.     procedure Init_My_Menus;
  8.     function NewBitMap (var theBitMap: BitMap; theRect: Rect): Ptr;
  9.     procedure InitVariables;
  10.  
  11. implementation
  12.  
  13. {=================================}
  14.  
  15.     procedure Init_My_Menus;
  16.         const
  17.             Menu1 = 201;                {Menu resource ID}
  18.             Menu2 = 202;                {Menu resource ID}
  19.             Menu3 = 203;                {Menu resource ID}
  20.     begin
  21.         ClearMenuBar;                            {Clear any old menu bars}
  22.         AppleMenu := GetMenu(Menu1);        {Get the menu from the resource file}
  23.         AddResMenu(AppleMenu, 'DRVR');    {Add in DAs}
  24.         InsertMenu(AppleMenu, 0);            {Insert this menu into the menu bar}
  25.         GameMenu := GetMenu(Menu2);        {Get the menu from the resource file}
  26.         InsertMenu(GameMenu, 0);                {Insert this menu into the menu bar}
  27.         OptionsMenu := GetMenu(Menu3);        {Get the menu from the resource file}
  28.         InsertMenu(OptionsMenu, 0);            {Insert this menu into the menu bar}
  29.         DisableItem(GameMenu, 2);
  30.         DisableItem(GameMenu, 3);
  31.         DrawMenuBar;
  32.     end;
  33.  
  34. {=================================}
  35.  
  36.     function NewBitMap;
  37.     begin
  38.         with theBitMap, theRect do
  39.             begin
  40.                 rowBytes := ((right - left + 15) div 16) * 2;
  41.                 baseAddr := NewPtr(rowBytes * (bottom - top));
  42.                 bounds := theRect;
  43.                 if MemError <> noErr then
  44.                     begin
  45.                         NewBitMap := nil
  46.                     end
  47.                 else
  48.                     NewBitMap := baseAddr;
  49.             end;
  50.     end;
  51.  
  52. {=================================}
  53.  
  54.     procedure InitVariables;
  55.         var
  56.             index, index2: Integer;
  57.             rawPointer: Ptr;
  58.             Pic_Handle: PicHandle;
  59.             theSnd: Handle;
  60.             tempRect: Rect;
  61.     begin
  62.         numberOfStones := 4;
  63.         levelStart := 1;
  64.         levelOn := 0;
  65.         mortalsStart := defaultNum;
  66.         chanPtr := nil;
  67.         ahnkCursor := GetCursor(5000);
  68.         playMask := MDownMask + MUpMask + KeyDownMask;
  69.         GetDateTime(RandSeed);
  70.         playing := FALSE;
  71.         pausing := FALSE;
  72.  
  73.         rawPointer := NewPtr(SizeOf(GrafPort));    {Initialize and setup offscreen virgin console}
  74.         offVirginPort := GrafPtr(rawPointer);
  75.         OpenPort(offVirginPort);
  76.         SetRect(offVirginArea, 0, 0, 512, 342);
  77.         offVirginBits := NewBitMap(offVirginMap, offVirginArea);
  78.         SetPortBits(offVirginMap);
  79.         EraseRect(offVirginMap.bounds);
  80.         Pic_Handle := GetPicture(1);                {Get Picture into memory}
  81.         if (Pic_Handle <> nil) then                {Only use handle if it is valid}
  82.             DrawPicture(Pic_Handle, offVirginArea);{Draw this picture}
  83.         ReleaseResource(Handle(Pic_Handle));
  84.  
  85.         rawPointer := NewPtr(SizeOf(GrafPort));    {Initialize and setup offscreen}
  86.         offLoadPort := GrafPtr(rawPointer);
  87.         OpenPort(offLoadPort);
  88.         SetRect(offLoadArea, 0, 0, 512, 342);
  89.         offLoadBits := NewBitMap(offLoadMap, offLoadArea);
  90.         SetPortBits(offLoadMap);
  91.         EraseRect(offLoadMap.bounds);
  92.  
  93.         rawPointer := NewPtr(SizeOf(GrafPort));    {Initialize and setup offscreen}
  94.         offPlayerPort := GrafPtr(rawPointer);
  95.         OpenPort(offPlayerPort);
  96.         SetRect(offPlayerArea, 0, 0, 512, 282);
  97.         offPlayerBits := NewBitMap(offPlayerMap, offPlayerArea);
  98.         SetPortBits(offPlayerMap);
  99.         EraseRect(offPlayerMap.bounds);
  100.         Pic_Handle := GetPicture(2);            {Get Picture into memory}
  101.         SetRect(tempRect, 0, 0, 512, 282);    {left,top,right,bottom}
  102.         if (Pic_Handle <> nil) then            {Only use handle if it is valid}
  103.             begin
  104.                 ClipRect(tempRect);                    {Clip picture to this rectangle}
  105.                 HLock(Handle(Pic_Handle));            {Lock the handle before using it}
  106.                 tempRect.Right := tempRect.Left + (Pic_Handle^^.picFrame.Right - Pic_Handle^^.picFrame.Left);
  107.                 tempRect.Bottom := tempRect.Top + (Pic_Handle^^.picFrame.Bottom - Pic_Handle^^.picFrame.Top);
  108.                 HUnLock(Handle(Pic_Handle));        {Unlock the picture again}
  109.             end;
  110.         if (Pic_Handle <> nil) then                {Only use handle if it is valid}
  111.             DrawPicture(Pic_Handle, tempRect);     {Draw this picture}
  112.         ReleaseResource(Handle(Pic_Handle));
  113.         SetRect(tempRect, 0, 0, 1023, 1023);     {Widen the clip area again}
  114.         ClipRect(tempRect);
  115.  
  116.         rawPointer := NewPtr(SizeOf(GrafPort));    {Initialize and setup offscreen}
  117.         offEnemyPort := GrafPtr(rawPointer);
  118.         OpenPort(offEnemyPort);
  119.         SetRect(offEnemyArea, 0, 0, 512, 285);
  120.         offEnemyBits := NewBitMap(offEnemyMap, offEnemyArea);
  121.         SetPortBits(offEnemyMap);
  122.         EraseRect(offEnemyMap.bounds);
  123.         SetPort(offEnemyPort);                {Set the port to my window}
  124.         Pic_Handle := GetPicture(3);            {Get Picture into memory}
  125.         SetRect(tempRect, 0, 0, 512, 285);        {left,top,right,bottom}
  126.         if (Pic_Handle <> nil) then            {Only use handle if it is valid}
  127.             begin
  128.                 ClipRect(tempRect);                {Clip picture to this rectangle}
  129.                 HLock(Handle(Pic_Handle));            {Lock the handle before using it}
  130.                 tempRect.Right := tempRect.Left + (Pic_Handle^^.picFrame.Right - Pic_Handle^^.picFrame.Left);
  131.                 tempRect.Bottom := tempRect.Top + (Pic_Handle^^.picFrame.Bottom - Pic_Handle^^.picFrame.Top);
  132.                 HUnLock(Handle(Pic_Handle));        {Unlock the picture again}
  133.             end;
  134.         if (Pic_Handle <> nil) then            {Only use handle if it is valid}
  135.             DrawPicture(Pic_Handle, tempRect);     {Draw this picture}
  136.         ReleaseResource(Handle(Pic_Handle));
  137.  
  138.         SetRect(playerRects[0, 0], 0, 0, 54, 51);                {Rects for player facing right    }
  139.         SetRect(playerRects[0, 1], 108, 0, 162, 51);
  140.         SetRect(playerRects[0, 2], 54, 0, 108, 51);
  141.         SetRect(playerRects[0, 3], 108, 0, 162, 51);
  142.         SetRect(playerRects[0, 4], 162, 10, 217, 49);
  143.         SetRect(playerRects[0, 5], 217, 10, 272, 49);
  144.         SetRect(playerRects[1, 0], 218, 104, 272, 155);    {Rects for player facing left    }
  145.         SetRect(playerRects[1, 1], 110, 104, 164, 155);
  146.         SetRect(playerRects[1, 2], 164, 104, 216, 155);
  147.         SetRect(playerRects[1, 3], 110, 104, 164, 155);
  148.         SetRect(playerRects[1, 4], 55, 114, 110, 153);
  149.         SetRect(playerRects[1, 5], 0, 114, 55, 153);
  150.  
  151.         SetRect(playerRects[2, 0], 0, 52, 54, 103);            {These are masks for above    }
  152.         SetRect(playerRects[2, 1], 108, 52, 162, 103);
  153.         SetRect(playerRects[2, 2], 54, 52, 108, 103);
  154.         SetRect(playerRects[2, 3], 108, 52, 162, 103);
  155.         SetRect(playerRects[2, 4], 162, 62, 217, 101);
  156.         SetRect(playerRects[2, 5], 217, 62, 272, 101);
  157.  
  158.         SetRect(playerRects[3, 0], 218, 156, 272, 207);
  159.         SetRect(playerRects[3, 1], 110, 156, 164, 207);
  160.         SetRect(playerRects[3, 2], 164, 156, 218, 207);
  161.         SetRect(playerRects[3, 3], 110, 156, 164, 207);
  162.         SetRect(playerRects[3, 4], 55, 166, 110, 205);
  163.         SetRect(playerRects[3, 5], 0, 166, 55, 205);
  164.  
  165.         SetRect(boneRects[0, 6, 0], 411, 108, 459, 146);    {Falling skeleton left    }
  166.         SetRect(boneRects[0, 6, 1], 462, 108, 510, 146);    {It's mask                }
  167.         SetRect(boneRects[1, 6, 0], 410, 69, 458, 107);        {Falling skeleton right    }
  168.         SetRect(boneRects[1, 6, 1], 461, 69, 509, 107);        {It's mask                }
  169.         SetRect(boneRects[0, 7, 0], 462, 191, 506, 214);    {Pile of bones - left        }
  170.         SetRect(boneRects[0, 7, 1], 462, 222, 506, 245);    {It's mask                }
  171.         SetRect(boneRects[1, 7, 0], 462, 191, 506, 214);    {Same bones for right    }
  172.         SetRect(boneRects[1, 7, 1], 462, 222, 506, 245);    {It's mask                }
  173.  
  174.         SetRect(enemyRects[0, 0, 0, 0], 289, 88, 331, 131);
  175.         SetRect(enemyRects[0, 1, 0, 0], 334, 88, 376, 131);
  176.         SetRect(enemyRects[0, 2, 0, 0], 379, 88, 421, 131);
  177.         SetRect(enemyRects[0, 3, 0, 0], 334, 88, 376, 131);
  178.         SetRect(enemyRects[0, 4, 0, 0], 0, 79, 68, 116);
  179.         SetRect(enemyRects[0, 5, 0, 0], 69, 79, 137, 116);
  180.         SetRect(enemyRects[1, 0, 0, 0], 289, 0, 331, 43);
  181.         SetRect(enemyRects[1, 1, 0, 0], 334, 0, 376, 43);
  182.         SetRect(enemyRects[1, 2, 0, 0], 379, 0, 421, 43);
  183.         SetRect(enemyRects[1, 3, 0, 0], 334, 0, 376, 43);
  184.         SetRect(enemyRects[1, 4, 0, 0], 0, 0, 68, 37);
  185.         SetRect(enemyRects[1, 5, 0, 0], 69, 0, 137, 37);
  186.         SetRect(enemyRects[2, 0, 0, 0], 289, 176, 331, 219);
  187.         SetRect(enemyRects[2, 1, 0, 0], 334, 176, 376, 219);
  188.         SetRect(enemyRects[2, 2, 0, 0], 379, 176, 421, 219);
  189.         SetRect(enemyRects[2, 3, 0, 0], 334, 176, 376, 219);
  190.         SetRect(enemyRects[2, 4, 0, 0], 0, 158, 68, 195);
  191.         SetRect(enemyRects[2, 5, 0, 0], 69, 158, 137, 195);
  192.         SetRect(enemyRects[0, 0, 1, 0], 0, 241, 42, 284);
  193.         SetRect(enemyRects[0, 1, 1, 0], 468, 88, 510, 131);
  194.         SetRect(enemyRects[0, 2, 1, 0], 423, 88, 465, 131);
  195.         SetRect(enemyRects[0, 3, 1, 0], 468, 88, 510, 131);
  196.         SetRect(enemyRects[0, 4, 1, 0], 207, 79, 275, 116);
  197.         SetRect(enemyRects[0, 5, 1, 0], 138, 79, 206, 116);
  198.         SetRect(enemyRects[1, 0, 1, 0], 43, 241, 85, 284);
  199.         SetRect(enemyRects[1, 1, 1, 0], 468, 0, 510, 43);
  200.         SetRect(enemyRects[1, 2, 1, 0], 423, 0, 465, 43);
  201.         SetRect(enemyRects[1, 3, 1, 0], 468, 0, 510, 43);
  202.         SetRect(enemyRects[1, 4, 1, 0], 207, 0, 275, 37);
  203.         SetRect(enemyRects[1, 5, 1, 0], 138, 0, 206, 37);
  204.         SetRect(enemyRects[2, 0, 1, 0], 86, 241, 128, 284);
  205.         SetRect(enemyRects[2, 1, 1, 0], 468, 176, 510, 219);
  206.         SetRect(enemyRects[2, 2, 1, 0], 423, 176, 465, 219);
  207.         SetRect(enemyRects[2, 3, 1, 0], 468, 176, 510, 219);
  208.         SetRect(enemyRects[2, 4, 1, 0], 207, 158, 275, 195);
  209.         SetRect(enemyRects[2, 5, 1, 0], 138, 158, 206, 195);
  210.  
  211.         SetRect(enemyRects[0, 0, 0, 1], 289, 132, 331, 175);
  212.         SetRect(enemyRects[0, 1, 0, 1], 334, 132, 376, 175);
  213.         SetRect(enemyRects[0, 2, 0, 1], 379, 132, 421, 175);
  214.         SetRect(enemyRects[0, 3, 0, 1], 334, 132, 376, 175);
  215.         SetRect(enemyRects[0, 4, 0, 1], 0, 117, 68, 154);
  216.         SetRect(enemyRects[0, 5, 0, 1], 69, 117, 137, 154);
  217.         SetRect(enemyRects[1, 0, 0, 1], 289, 44, 331, 87);
  218.         SetRect(enemyRects[1, 1, 0, 1], 334, 44, 376, 87);
  219.         SetRect(enemyRects[1, 2, 0, 1], 379, 44, 421, 87);
  220.         SetRect(enemyRects[1, 3, 0, 1], 334, 44, 376, 87);
  221.         SetRect(enemyRects[1, 4, 0, 1], 0, 42, 68, 79);
  222.         SetRect(enemyRects[1, 5, 0, 1], 69, 42, 137, 79);
  223.         SetRect(enemyRects[2, 0, 0, 1], 289, 220, 331, 263);
  224.         SetRect(enemyRects[2, 1, 0, 1], 334, 220, 376, 263);
  225.         SetRect(enemyRects[2, 2, 0, 1], 379, 220, 421, 263);
  226.         SetRect(enemyRects[2, 3, 0, 1], 334, 220, 376, 263);
  227.         SetRect(enemyRects[2, 4, 0, 1], 0, 201, 68, 238);
  228.         SetRect(enemyRects[2, 5, 0, 1], 69, 200, 137, 237);
  229.         SetRect(enemyRects[0, 0, 1, 1], 129, 241, 171, 285);
  230.         SetRect(enemyRects[0, 1, 1, 1], 468, 132, 510, 175);
  231.         SetRect(enemyRects[0, 2, 1, 1], 423, 132, 465, 175);
  232.         SetRect(enemyRects[0, 3, 1, 1], 468, 132, 510, 175);
  233.         SetRect(enemyRects[0, 4, 1, 1], 207, 117, 275, 154);
  234.         SetRect(enemyRects[0, 5, 1, 1], 138, 117, 206, 154);
  235.         SetRect(enemyRects[1, 0, 1, 1], 172, 241, 214, 284);
  236.         SetRect(enemyRects[1, 1, 1, 1], 468, 44, 510, 87);
  237.         SetRect(enemyRects[1, 2, 1, 1], 423, 44, 465, 87);
  238.         SetRect(enemyRects[1, 3, 1, 1], 468, 44, 510, 87);
  239.         SetRect(enemyRects[1, 4, 1, 1], 207, 42, 275, 79);
  240.         SetRect(enemyRects[1, 5, 1, 1], 138, 42, 206, 79);
  241.         SetRect(enemyRects[2, 0, 1, 1], 215, 241, 257, 284);
  242.         SetRect(enemyRects[2, 1, 1, 1], 468, 220, 510, 263);
  243.         SetRect(enemyRects[2, 2, 1, 1], 423, 220, 465, 263);
  244.         SetRect(enemyRects[2, 3, 1, 1], 468, 220, 510, 263);
  245.         SetRect(enemyRects[2, 4, 1, 1], 207, 200, 275, 237);
  246.         SetRect(enemyRects[2, 5, 1, 1], 138, 200, 206, 237);
  247.  
  248.         enemyLift[0] := -1;
  249.         enemyLift[1] := -2;
  250.         enemyLift[2] := -4;
  251.  
  252.         SetRect(handRects[0, 0], 274, 69, 340, 126);
  253.         SetRect(handRects[1, 0], 341, 77, 406, 126);
  254.         SetRect(handRects[0, 1], 274, 127, 340, 186);    {location of masks}
  255.         SetRect(handRects[1, 1], 341, 136, 406, 186);
  256.  
  257.         for index := 0 to 15 do
  258.             begin
  259.                 SetRect(ankRects[index, 0], index * 17 + 1, 209, index * 17 + 17, 234);
  260.                 SetRect(ankRects[index, 1], index * 17 + 1, 236, index * 17 + 17, 261);
  261.             end;
  262.  
  263.         for index := 0 to 1 do
  264.             for index2 := 0 to 5 do
  265.                 SetRect(absoluteRects[index, index2], 0, 0, playerRects[index, index2].right - playerRects[index, index2].left, playerRects[index, index2].bottom - playerRects[index, index2].top);
  266.  
  267.         running[-16, 0, 0] := -14;    {new hori velocity}
  268.         running[-16, 0, 1] := 1;        {bird leg mode}
  269.         running[-15, 0, 0] := -13;
  270.         running[-15, 0, 1] := 1;
  271.         running[-14, 0, 0] := -12;
  272.         running[-14, 0, 1] := 1;
  273.         running[-13, 0, 0] := -11;
  274.         running[-13, 0, 1] := 1;
  275.         running[-12, 0, 0] := -10;
  276.         running[-12, 0, 1] := 1;
  277.         running[-11, 0, 0] := -9;
  278.         running[-11, 0, 1] := 1;
  279.         running[-10, 0, 0] := -8;
  280.         running[-10, 0, 1] := 1;
  281.         running[-9, 0, 0] := -7;
  282.         running[-9, 0, 1] := 1;
  283.         running[-8, 0, 0] := -6;
  284.         running[-8, 0, 1] := 1;
  285.         running[-7, 0, 0] := -5;
  286.         running[-7, 0, 1] := 1;
  287.         running[-6, 0, 0] := -4;
  288.         running[-6, 0, 1] := 1;
  289.         running[-5, 0, 0] := -3;
  290.         running[-5, 0, 1] := 1;
  291.         running[-4, 0, 0] := -2;
  292.         running[-4, 0, 1] := 1;
  293.         running[-3, 0, 0] := -1;
  294.         running[-3, 0, 1] := 1;
  295.         running[-2, 0, 0] := 0;
  296.         running[-2, 0, 1] := 1;
  297.         running[-1, 0, 0] := 1;
  298.         running[-1, 0, 1] := 1;
  299.         running[0, 0, 0] := 4;
  300.         running[0, 0, 1] := 0;
  301.         running[1, 0, 0] := 4;
  302.         running[1, 0, 1] := 0;
  303.         running[2, 0, 0] := 4;
  304.         running[2, 0, 1] := 0;
  305.         running[3, 0, 0] := 12;
  306.         running[3, 0, 1] := 3;
  307.         running[4, 0, 0] := 11;
  308.         running[4, 0, 1] := 1;
  309.         running[5, 0, 0] := 4;
  310.         running[5, 0, 1] := 0;
  311.         running[6, 0, 0] := 4;
  312.         running[6, 0, 1] := 0;
  313.         running[7, 0, 0] := 4;
  314.         running[7, 0, 1] := 0;
  315.         running[8, 0, 0] := 12;
  316.         running[8, 0, 1] := 3;
  317.         running[9, 0, 0] := 12;
  318.         running[9, 0, 1] := 3;
  319.         running[10, 0, 0] := 12;
  320.         running[10, 0, 1] := 3;
  321.         running[11, 0, 0] := 3;
  322.         running[11, 0, 1] := 2;
  323.         running[12, 0, 0] := 4;
  324.         running[12, 0, 1] := 0;
  325.         running[13, 0, 0] := 11;
  326.         running[13, 0, 1] := 1;
  327.         running[14, 0, 0] := 12;
  328.         running[14, 0, 1] := 1;
  329.         running[15, 0, 0] := 13;
  330.         running[15, 0, 1] := 1;
  331.         running[16, 0, 0] := 14;
  332.         running[16, 0, 1] := 1;
  333.  
  334.         for index := -16 to 16 do
  335.             begin
  336.                 running[index, 1, 0] := -running[-index, 0, 0];
  337.                 running[index, 1, 1] := running[-index, 0, 1];
  338.             end;
  339.  
  340.         for index := 2 to 16 do
  341.             begin
  342.                 idleLanded[index] := index - 2;
  343.                 idleLanded[-index] := -index + 2;
  344.             end;
  345.         idleLanded[-1] := 0;
  346.         idleLanded[0] := 0;
  347.         idleLanded[1] := 0;
  348.  
  349.         for index := -16 to -1 do
  350.             begin
  351.                 gliding[index, 0] := index + 3;
  352.                 gliding[-index, 1] := -index - 3;
  353.             end;
  354.  
  355.         for index := 0 to 14 do
  356.             begin
  357.                 gliding[index, 0] := index + 2;
  358.                 gliding[-index, 1] := -index - 2;
  359.             end;
  360.  
  361.         gliding[16, 0] := 16;
  362.         gliding[-16, 1] := -16;
  363.         gliding[15, 0] := 16;
  364.         gliding[-15, 1] := -16;
  365.  
  366.         for index := -70 to 16 do
  367.             begin
  368.                 impacted[index] := (-2 * index) div 3;
  369.             end;
  370.         SetRect(tombRects[-5], -70, 317, 167, 343);
  371.         SetRect(tombRects[-4], 346, 317, 583, 343);
  372.         SetRect(tombRects[-3], 201, 145, 312, 162);
  373.         SetRect(tombRects[-2], 167, 317, 346, 343);
  374.         SetRect(tombRects[-1], -70, 317, 583, 343);
  375.         SetRect(tombRects[0], 167, 317, 346, 343);
  376.         SetRect(tombRects[1], -70, 211, 110, 226);
  377.         SetRect(tombRects[2], 403, 211, 583, 226);
  378.         SetRect(tombRects[3], -70, 95, 134, 110);
  379.         SetRect(tombRects[4], 379, 95, 583, 110);
  380.         SetRect(tombRects[5], 201, 145, 312, 162);
  381.         SetRect(tombRects[6], -70, 317, 167, 343);
  382.  
  383.         SetRect(eyeRects[0], 465, 0, 512, 33);
  384.         SetRect(eyeRects[1], 417, 0, 464, 33);
  385.         SetRect(eyeRects[2], 370, 0, 417, 33);
  386.         SetRect(eyeRects[3], 323, 0, 370, 33);
  387.         SetRect(eyeRects[4], 276, 0, 323, 33);
  388.         SetRect(eyeRects[5], 465, 33, 512, 66);    {eye mask Rects follow}
  389.         SetRect(eyeRects[6], 417, 33, 464, 66);
  390.         SetRect(eyeRects[7], 370, 33, 417, 66);
  391.         SetRect(eyeRects[8], 323, 33, 370, 66);
  392.         SetRect(eyeRects[9], 276, 33, 323, 66);
  393.  
  394.         with theEye do
  395.             begin
  396.                 dest := eyeRects[4];
  397.                 OffsetRect(dest, -43, 70);
  398.                 oldDest := dest;
  399.             end;
  400.  
  401.         SetRect(eggRects[0], 410, 164, 432, 186);
  402.         SetRect(eggRects[1], 434, 164, 456, 186);
  403.  
  404.         SetRect(flameRect[0], 44, 226, 71, 275);
  405.         SetRect(flameRect[1], 445, 226, 472, 275);
  406.  
  407.         SetRect(littleTombRect, 260, 266, 371, 283);
  408.         SetRect(upperTombRect1, 0, 265, 135, 281);
  409.         SetRect(upperTombRect2, 136, 265, 271, 281);
  410.  
  411.         SetRect(scoreGrabRect, 373, 266, 509, 283);
  412.         SetRect(scoreDropRect, 189, 166, 325, 183);
  413.  
  414.         SetRect(gameoverRects[0], 274, 189, 456, 224);
  415.         SetRect(gameoverRects[1], 274, 225, 456, 261);
  416.  
  417.         SetRect(playRect, 12, 37, 500, 322);
  418.  
  419.         MoveTo(0, 0);
  420.         playRgn := NewRgn;
  421.         OpenRgn;
  422.         LineTo(0, 339);
  423.         LineTo(122, 339);
  424.         LineTo(122, 161);
  425.         LineTo(133, 141);
  426.         LineTo(144, 161);
  427.         LineTo(144, 339);
  428.         LineTo(369, 339);
  429.         LineTo(369, 161);
  430.         LineTo(380, 141);
  431.         LineTo(391, 161);
  432.         LineTo(391, 339);
  433.         LineTo(512, 339);
  434.         LineTo(512, 0);
  435.         LineTo(0, 0);
  436.         CloseRgn(playRgn);
  437.         HLock(Handle(playRgn));
  438.  
  439.         MoveTo(122, 339);
  440.         obeliskRgn1 := NewRgn;
  441.         OpenRgn;
  442.         LineTo(122, 161);
  443.         LineTo(133, 141);
  444.         LineTo(144, 161);
  445.         LineTo(144, 339);
  446.         LineTo(122, 339);
  447.         CloseRgn(obeliskRgn1);
  448.         HLock(Handle(obeliskRgn1));
  449.  
  450.         MoveTo(369, 339);
  451.         obeliskRgn2 := NewRgn;
  452.         OpenRgn;
  453.         LineTo(369, 161);
  454.         LineTo(380, 141);
  455.         LineTo(391, 161);
  456.         LineTo(391, 339);
  457.         LineTo(369, 339);
  458.         CloseRgn(obeliskRgn2);
  459.         HLock(Handle(obeliskRgn2));
  460.  
  461.         theSnd := GetNamedResource('snd ', 'ahnk.snd');
  462.         theSnd := GetNamedResource('snd ', 'bird.snd');
  463.         theSnd := GetNamedResource('snd ', 'bonus.snd');
  464.         theSnd := GetNamedResource('snd ', 'boom1.snd');
  465.         theSnd := GetNamedResource('snd ', 'boom2.snd');
  466.         theSnd := GetNamedResource('snd ', 'drip.snd');
  467.         theSnd := GetNamedResource('snd ', 'flap.snd');
  468.         theSnd := GetNamedResource('snd ', 'flip.snd');
  469.         theSnd := GetNamedResource('snd ', 'music.snd');
  470.         theSnd := GetNamedResource('snd ', 'rez.snd');
  471.         theSnd := GetNamedResource('snd ', 'screech.snd');
  472.         theSnd := GetNamedResource('snd ', 'spawn.snd');
  473.         theSnd := GetNamedResource('snd ', 'walk.snd');
  474.         theSnd := GetNamedResource('snd ', 'lightning.snd');
  475.     end;
  476.  
  477. {=================================}
  478.  
  479. end.